package com.vive.model;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;

import java.util.Date;
import java.util.HashMap;


public class UserInfoPage extends WebPage {
    public UserInfoPage(){
        super();
//        创对象
//        User user = new User();
        HashMap user = new HashMap();
        user.put("name","userName");
        user.put("birthday",new Date());

        StringResourceModel nameModel = new StringResourceModel("name", this, new Model(user));
        add(new Label("name",nameModel));

        StringResourceModel birthdayModel = new StringResourceModel("birthday",this,new Model(user));
        add(new Label("birthday",birthdayModel));


    }
}
